import {
    Entity,
    PrimaryGeneratedColumn,
    Column,
    BeforeInsert
} from 'typeorm';
import * as bcrypt from 'bcryptjs'

@Entity('im_chat_rooms') // 指定表名称为 'im_chat_rooms'
export class ChatRooms {

    @PrimaryGeneratedColumn({ comment: '聊天室id', })
    chatroom_id: string;

    @Column({ comment: '聊天室名称', length: 50, })
    room_name: string;

    @Column({ comment: '创建者id', })
    user_id: string;

    // 创建时间
    @Column({
        comment: '创建时间',
        name: 'create_time',
        type: 'timestamp',
        default: () => 'CURRENT_TIMESTAMP',
    })
    create_time: Date;
}



